package com.itetchologyandenglish.home.service.Impl;

import com.itetchologyandenglish.home.enetity.Auth;
import com.itetchologyandenglish.home.mapper.PageMapper;
import com.itetchologyandenglish.home.service.PageService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import java.util.List;
@Service
public class PageServiceImpl implements PageService {
    @Resource
    PageMapper mapper;
    @Override
    public List<Auth> getAuthByRoleId(Integer roleId) {
        return mapper.getAuthByRoleId(roleId);
    }

    @Override
    public boolean updatePwd(String oldPwd, String nowPwd,String username) {
        if(mapper.updatePwd(oldPwd, nowPwd, username)>0){
            return true;
        }
        return false;
    }
}
